Untitled5.ipynb
No Headings
The table of contents shows headings in notebooks and supported files.
- File
- Edit
- View
- Run
- Kernel
- Settings
- Help
[10]:
| gender | race/ethnicity | parental level of education | lunch | test preparation course | math score | reading score | writing score | |
|---|---|---|---|---|---|---|---|---|
| 0 | female | group B | bachelor's degree | standard | none | 72 | 72 | 74 |
| 1 | female | group C | some college | standard | completed | 69 | 90 | 88 |
| 2 | female | group B | master's degree | standard | none | 90 | 95 | 93 |
| 3 | male | group A | associate's degree | free/reduced | none | 47 | 57 | 44 |
| 4 | male | group C | some college | standard | none | 76 | 78 | 75 |
<class 'pandas.core.frame.DataFrame'> RangeIndex: 1000 entries, 0 to 999 Data columns (total 8 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 gender 1000 non-null object 1 race/ethnicity 1000 non-null object 2 parental level of education 1000 non-null object 3 lunch 1000 non-null object 4 test preparation course 1000 non-null object 5 math score 1000 non-null int64 6 reading score 1000 non-null int64 7 writing score 1000 non-null int64 dtypes: int64(3), object(5) memory usage: 62.6+ KB
[14]:
| math score | reading score | writing score | |
|---|---|---|---|
| count | 1000.00000 | 1000.000000 | 1000.000000 |
| mean | 66.08900 | 69.169000 | 68.054000 |
| std | 15.16308 | 14.600192 | 15.195657 |
| min | 0.00000 | 17.000000 | 10.000000 |
| 25% | 57.00000 | 59.000000 | 57.750000 |
| 50% | 66.00000 | 70.000000 | 69.000000 |
| 75% | 77.00000 | 79.000000 | 79.000000 |
| max | 100.00000 | 100.000000 | 100.000000 |
[16]:
Index(['gender', 'race/ethnicity', 'parental level of education', 'lunch',
'test preparation course', 'math score', 'reading score',
'writing score'],
dtype='object')[18]:
gender 0 race/ethnicity 0 parental level of education 0 lunch 0 test preparation course 0 math score 0 reading score 0 writing score 0 dtype: int64
[20]:
| math score | reading score | writing score | |
|---|---|---|---|
| gender | |||
| female | 63.633205 | 72.608108 | 72.467181 |
| male | 68.728216 | 65.473029 | 63.311203 |
[22]:
| math score | reading score | writing score | |
|---|---|---|---|
| lunch | |||
| free/reduced | 58.921127 | 64.653521 | 63.022535 |
| standard | 70.034109 | 71.654264 | 70.823256 |
[24]:
| math score | reading score | writing score | |
|---|---|---|---|
| test preparation course | |||
| completed | 69.695531 | 73.893855 | 74.418994 |
| none | 64.077882 | 66.534268 | 64.504673 |
[30]:
sns.histplot(df["reading score"], kde=True)
plt.title("Reading Score Distribution")
plt.show()
[32]:
df.groupby("test preparation course")[["math score", "reading score", "writing score"]].mean().plot(kind="bar")
plt.title("Average Scores vs Test Preparation")
plt.ylabel("Average Score")
plt.show()
[34]:
df.groupby("gender")[["math score", "reading score", "writing score"]].mean()
[34]:
| math score | reading score | writing score | |
|---|---|---|---|
| gender | |||
| female | 63.633205 | 72.608108 | 72.467181 |
| male | 68.728216 | 65.473029 | 63.311203 |
[ ]:
Common Tools
No metadata.
Advanced Tools
No metadata.
Anaconda Assistant
AI-powered coding, insights and debugging in your notebooks.
To enable the following extensions, create an account or sign in.
- Anaconda Assistant4.1.0
- Coming soon!
- Data Catalogs
- Panel Deployments
- Sharing
Already have an account? Sign In
For more information, read our Anaconda Assistant documentation.
![Python [conda env:base] *](./Week1-StudentPerformance-EDA.jpynb_files/logo-64x64.png)